home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / Macintosh Easy Open 1.1f1 / Documentation / Developer / Interfaces / CIncludes / Translation.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-13  |  3.6 KB  |  116 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Translation.h
  3.  
  4.      Copyright:    © 1984-1994 by Apple Computer, Inc.
  5.                  All rights reserved.
  6.  
  7.      Version:    Built by:            anonymous
  8.                  From:                Translation.i, revision 8, dated 5/31/94
  9.                  With Interfacer:    1.1d4e2
  10.  
  11.      Bugs:        Report bugs to Radar component “System Interfaces”, “Latest”
  12.                  List the version information from above in Problem Description.
  13.  
  14. */
  15.  
  16. #ifndef __TRANSLATION__
  17. #define __TRANSLATION__
  18.  
  19.  
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23.  
  24. #ifndef REZ
  25.  
  26. #ifndef __TYPES__
  27. #include <Types.h>
  28. #endif
  29. /*    #include <ConditionalMacros.h>                                */
  30. /*    #include <MixedMode.h>                                        */
  31. /*        #include <Traps.h>                                        */
  32.  
  33. #ifndef __FILES__
  34. #include <Files.h>
  35. #endif
  36. /*    #include <OSUtils.h>                                        */
  37. /*    #include <SegLoad.h>                                        */
  38.  
  39. #ifndef __COMPONENTS__
  40. #include <Components.h>
  41. #endif
  42.  
  43. #ifndef __TRANSLATIONEXTENSIONS__
  44. #include <TranslationExtensions.h>
  45. #endif
  46. /*    #include <Memory.h>                                            */
  47. /*    #include <Quickdraw.h>                                        */
  48. /*        #include <QuickdrawText.h>                                */
  49. /*            #include <IntlResources.h>                            */
  50. /*    #include "Components.h"                                        */
  51. #define gestaltTranslationPPCAvail 2
  52.  
  53. #define gestaltTranslationGetPathAPIAvail 3
  54.  
  55. typedef long FileTranslationSpec[12];
  56.  
  57. typedef short DocOpenMethod;
  58.  
  59.  
  60. enum {
  61.     domCannot,
  62.     domNative,
  63.     domTranslateFirst,
  64.     domWildcard
  65. };
  66.  
  67. typedef OSType TypesBlock[64];
  68.  
  69. typedef OSType *TypesBlockPtr;
  70.  
  71. #define TranslationScrapProgressDialogID -16555
  72.  
  73. #if defined(powerc) || defined (__powerc)
  74. #pragma options align=mac68k
  75. #endif
  76. struct TranslationSpec {
  77.     OSType                            componentSignature;
  78.     const void                        *translationSystemInfo;
  79.     FileTypeSpec                    src;
  80.     FileTypeSpec                    dst;
  81. };
  82. #if defined(powerc) || defined(__powerc)
  83. #pragma options align=reset
  84. #endif
  85.  
  86. typedef struct TranslationSpec TranslationSpec;
  87.  
  88. typedef TranslationSpec *TranslationSpecArrayPtr;
  89.  
  90. extern pascal OSErr GetFileTypesThatAppCanNativelyOpen(short appVRefNumHint, OSType appSignature, FileType *nativeTypes)
  91.  TWOWORDINLINE(0x701C, 0xABFC);
  92. extern pascal OSErr ExtendFileTypeList(const FileType *originalTypeList, short numberOriginalTypes, FileType *extendedTypeList, short *numberExtendedTypes)
  93.  TWOWORDINLINE(0x7009, 0xABFC);
  94. extern pascal OSErr CanDocBeOpened(const FSSpec *targetDocument, short appVRefNumHint, OSType appSignature, const FileType *nativeTypes, Boolean onlyNative, DocOpenMethod *howToOpen, FileTranslationSpec *howToTranslate)
  95.  TWOWORDINLINE(0x701E, 0xABFC);
  96. extern pascal short GetFileTranslationPaths(FSSpec *srcDocument, FileType dstDocType, unsigned short maxResultCount, TranslationSpecArrayPtr resultBuffer)
  97.  TWOWORDINLINE(0x7038, 0xABFC);
  98. extern pascal OSErr GetPathFromTranslationDialog(const FSSpec *theDocument, const FSSpec *theApplication, const TypesBlockPtr typeList, DocOpenMethod *howToOpen, FileTranslationSpec *howToTranslate)
  99.  TWOWORDINLINE(0x7037, 0xABFC);
  100. extern pascal OSErr TranslateFile(const FSSpec *sourceDocument, const FSSpec *destinationDocument, const FileTranslationSpec *howToTranslate)
  101.  TWOWORDINLINE(0x700C, 0xABFC);
  102. extern pascal OSErr GetDocumentKindString(short docVRefNum, OSType docType, OSType docCreator, Str63 kindString)
  103.  TWOWORDINLINE(0x7016, 0xABFC);
  104. extern pascal OSErr GetTranslationExtensionName(const TranslationSpec *translationMethod, Str31 extensionName)
  105.  TWOWORDINLINE(0x7036, 0xABFC);
  106. typedef pascal OSErr (*GetScrapDataProcPtr)(ScrapType requestedFormat, Handle dataH, void *srcDataGetterRefCon);
  107. extern pascal OSErr TranslateScrap(GetScrapDataProcPtr sourceDataGetter, void *sourceDataGetterRefCon, ScrapType destinationFormat, Handle destinationData, short progressDialogID)
  108.  TWOWORDINLINE(0x700E, 0xABFC);
  109. #endif
  110.  
  111. #ifdef __cplusplus
  112. }
  113. #endif
  114.  
  115. #endif /* __TRANSLATION__ */
  116.